Microelectromechanical systems (MEMS) devices, such as accelerometers, pressure sensors, and microphones, have found widespread use in many modern day electronic devices. MEMS devices may have a movable part, that is used to detect a motion, and convert the motion to electrical signal. For example, MEMS accelerometers and microphones are commonly found in automobiles (e.g., in airbag deployment systems), tablet computers, or in smart phones. A MEMS accelerometer includes a movable part that transfers the accelerating movement to an electrical signal. A microphone includes a movable membrane that transfers the sound to an electrical signal.